<div style="text-align: center">
    <?if(User::is_logged()):?>
    <?$user_name=SESSION_value('user_name','Guest')?>
    <div style="width: 300px;background: #fff;border:1px solid #eee;margin:50px auto 100px auto;padding:20px;text-align: left">
    <p>Xin chào <b><?=$user_name?></b></p>
    <?if(!empty($error)):?>
    <div class="error"><?=$error?></div>
    <?endif?>
    <form style="margin:20px 40px;"action="index.php?m=users&a=passwd&s=submit" method="POST">
        <p>Mật khẩu cũ<br/><input type="password" name="user_password"/></p>
        <p>Mật khẩu mới<br/><input type="password" name="new_user_password"/></p>
        <p>Nhập lại khẩu mới<br/><input type="password" name="confirm_user_password"/></p>
        <p><input type="submit" value="Đổi mật khẩu"/></p>
    </form>
    </div>
    <?else:?>
    <div style="width: 300px;background: #eee;border:1px solid #ddd;margin:50px auto 100px auto;padding:20px;text-align: left">
        <h2>User Login</h2>
    <? if(!empty($error)):?><div class="error"><?=$error?></div><?endif?>
    <form style="margin:20px 40px;"action="index.php?m=users&a=login&s=submit" method="POST">
        <p>User name<br/><input type="text" name="user_name" value="<?=$data['user_name']?>"/></p>
        <p>Password<br/><input type="password" name="user_password"/></p>
        <p><input type="submit" value="Login"/></p>
        <p>
            <input type="checkbox" name="remember_me" <?if(!empty($data['remember_me'])):?>checked<?endif?> />
            Remember my login <span style="font-size:80%;color:#FF0000">(don't check if using puplic computers)</span>
        </p>
    </form>
    </div>
    <?endif?>
</div>